.class Lcom/instagram/android/creation/b/i;
.super Ljava/lang/Object;
.source "CameraFragment.java"

# interfaces
.implements Lcom/instagram/android/creation/widget/d;


# instance fields
.field final synthetic a:Lcom/instagram/android/creation/b/a;


# direct methods
.method constructor <init>(Lcom/instagram/android/creation/b/a;)V
    .locals 0
    .parameter

    .prologue
    .line 1185
    iput-object p1, p0, Lcom/instagram/android/creation/b/i;->a:Lcom/instagram/android/creation/b/a;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Landroid/view/View;Lcom/instagram/android/creation/widget/e;)V
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 1190
    sget-object v0, Lcom/instagram/android/creation/b/c;->a:[I

    invoke-virtual {p2}, Lcom/instagram/android/creation/widget/e;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    .line 1201
    iget-object v0, p0, Lcom/instagram/android/creation/b/i;->a:Lcom/instagram/android/creation/b/a;

    sget v1, Lcom/facebook/ba;->pref_camera_flash_mode_off:I

    invoke-virtual {v0, v1}, Lcom/instagram/android/creation/b/a;->b(I)Ljava/lang/String;

    move-result-object v0

    .line 1202
    iget-object v1, p0, Lcom/instagram/android/creation/b/i;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v1}, Lcom/instagram/android/creation/b/a;->k(Lcom/instagram/android/creation/b/a;)Landroid/hardware/Camera$Parameters;

    move-result-object v1

    const-string v2, "off"

    invoke-virtual {v1, v2}, Landroid/hardware/Camera$Parameters;->setFlashMode(Ljava/lang/String;)V

    .line 1206
    :goto_0
    iget-object v1, p0, Lcom/instagram/android/creation/b/i;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v1}, Lcom/instagram/android/creation/b/a;->l(Lcom/instagram/android/creation/b/a;)Lcom/instagram/camera/k;

    move-result-object v1

    invoke-virtual {v1}, Lcom/instagram/camera/k;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    .line 1207
    const-string v2, "pref_camera_flashmode_key"

    invoke-interface {v1, v2, v0}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    .line 1208
    invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 1210
    iget-object v0, p0, Lcom/instagram/android/creation/b/i;->a:Lcom/instagram/android/creation/b/a;

    const/4 v1, 0x4

    invoke-static {v0, v1}, Lcom/instagram/android/creation/b/a;->b(Lcom/instagram/android/creation/b/a;I)V

    .line 1211
    return-void

    .line 1192
    :pswitch_0
    iget-object v0, p0, Lcom/instagram/android/creation/b/i;->a:Lcom/instagram/android/creation/b/a;

    sget v1, Lcom/facebook/ba;->pref_camera_flash_mode_on:I

    invoke-virtual {v0, v1}, Lcom/instagram/android/creation/b/a;->b(I)Ljava/lang/String;

    move-result-object v0

    .line 1193
    iget-object v1, p0, Lcom/instagram/android/creation/b/i;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v1}, Lcom/instagram/android/creation/b/a;->k(Lcom/instagram/android/creation/b/a;)Landroid/hardware/Camera$Parameters;

    move-result-object v1

    const-string v2, "on"

    invoke-virtual {v1, v2}, Landroid/hardware/Camera$Parameters;->setFlashMode(Ljava/lang/String;)V

    goto :goto_0

    .line 1196
    :pswitch_1
    iget-object v0, p0, Lcom/instagram/android/creation/b/i;->a:Lcom/instagram/android/creation/b/a;

    sget v1, Lcom/facebook/ba;->pref_camera_flash_mode_auto:I

    invoke-virtual {v0, v1}, Lcom/instagram/android/creation/b/a;->b(I)Ljava/lang/String;

    move-result-object v0

    .line 1197
    iget-object v1, p0, Lcom/instagram/android/creation/b/i;->a:Lcom/instagram/android/creation/b/a;

    invoke-static {v1}, Lcom/instagram/android/creation/b/a;->k(Lcom/instagram/android/creation/b/a;)Landroid/hardware/Camera$Parameters;

    move-result-object v1

    const-string v2, "auto"

    invoke-virtual {v1, v2}, Landroid/hardware/Camera$Parameters;->setFlashMode(Ljava/lang/String;)V

    goto :goto_0

    .line 1190
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method
